package org.example.services;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

@Component
public class LifeCyleListener {


    @Value("${foo}")
    private String foo;


    /**
     * 初始化alertmanager的配置
     */
    @EventListener(ApplicationReadyEvent.class)
    public void testEventListener(){
        System.out.println("testEventListener"+ this.foo);
    }

}
